<?php

namespace IDock\Insurance\AMIC\Request;

use Exception;
use IDock\Insurance\AMIC\Request\AllAMICRequest;
use IDock\Insurance\AMIC\Response\RenewalInquiryResponse;
use IDock\Visitor\RenewalInquiryVisitor;

class RenewalInquiryRequest extends AllAMICRequest
{
    public $requestType = 'N0201';

    protected $response = RenewalInquiryResponse::class;

    protected $urlTip = '续保查询';

    /*** @var  RenewalInquiryVisitor $visitor */
    protected $visitor;

    /**
     * @return array
     * @throws Exception
     */
    public function generate(): array
    {
        return [
            'renewBase' => [
                'vinNo' => $this->visitor->vin,
                'comCode' => '',
                'handlerCode' => $this->visitor->argc['handlerCode'] ?? '',
                'licensePlateNo' => $this->visitor->licenseNo,
            ]
        ];
    }
}
